package com.yigo.prc.infra.repo.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.tangzc.mpe.autotable.annotation.Column;
import com.tangzc.mpe.autotable.annotation.ColumnId;
import com.tangzc.mpe.autotable.annotation.Table;
import com.tangzc.mpe.autotable.strategy.mysql.data.MysqlTypeConstant;
import com.yigo.framework.base.BasePO;
import lombok.Data;

/**
 * @author chenzl
 */
@Data
@Table(value = "prc_category", comment = "商品分类表")
public class PrcCategoryPO extends BasePO {
    /**
     * 主键Id<br/>
     * 建表通过执行如下SQL控制ID从10000开始递增<br/>
     * ALTER TABLE table_name AUTO_INCREMENT = 10000;<br/>
     */
    @ColumnId(mode = IdType.AUTO, comment = "id主键", type = MysqlTypeConstant.INT, length = 10)
    private Long id;
    /**
     * 上级分类id
     */
    @Column(comment = "上级分类id", length = 10, notNull = true)
    private Long pid;
    /**
     * 分类名称
     */
    @Column(comment = "分类名称", length = 30, notNull = true)
    private String categoryName;
}
